from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client


secret_id = 'AKIDV3dovpfQ9g8UddhknssswAJQSQHzW0Ua'      # 替换为用户的 secretId
secret_key = '51v7FE4kV7ZxY2NZZZS8c63utkVAjAWk'      # 替换为用户的 secretKey
region = 'ap-guangzhou'     # 替换为用户的 Region

config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key)
# 2. 获取客户端对象
client = CosS3Client(config)

# client.delete_object(
#     Bucket='test-1320194660',
#     Key='FDNH.png',  # 上传到桶之后的文件名
# )

objects = {
    "Quiet": "true",
    "Object": [
        {
            "Key": "wechat.jpg"
        },
        {
            "Key": "11.png"
        }
    ]
}

client.delete_objects(
    Bucket='test-1320194660',
    Delete=objects,
)






